package com.chengwei.ch.busdemo.activity;

import android.annotation.SuppressLint;
import android.os.Bundle;
import android.util.Log;
import android.view.Gravity;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;

import androidx.constraintlayout.widget.ConstraintLayout;

import com.chengwei.ch.busdemo.R;
import com.chengwei.ch.busdemo.base.BaseActivity;
import com.chengwei.ch.busdemo.view.TitleView;
import com.chengwei.ch.busdemo.view.WidgetController;
import com.zyl.customkeyboardview.CustomKeyboardEditText;

@SuppressLint("Registered")
public class RegisterActivity extends BaseActivity {

    //创建播放视频的控件对象
    private TitleView titleBack;
    private CustomKeyboardEditText etIdCard;
    private ConstraintLayout clBottomRegister;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_register);
        initView();
        initClickListener();
    }


    private void initView() {
        titleBack = findViewById(R.id.titleBackRegister);
        etIdCard = findViewById(R.id.etIdCardRegister);
        clBottomRegister = findViewById(R.id.clBottomRegister);
    }


    private void initClickListener() {
        titleBack.addTitleLeftOnClickListener(this);
        etIdCard.setOnKeyBordShowListener(isKeyBordShow -> {
         /*   int height = WidgetController.getHeight(clBottomRegister);
            if (isKeyBordShow) {
                Log.d("MainActivity","height:" + height);
                WidgetController.setLayoutY(clBottomRegister,height);
            }else WidgetController.setLayoutY(clBottomRegister,0);*/
        });
    }


    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.IBtnTitleViewLeftBack: {
                finish();
                break;
            }
            default:
                break;
        }
    }
}
